(function () {
    'use strict';

    angular.module('app').service('WctTemplateService', WctTemplateService);

    WctTemplateService.$inject = [
        //'Upload',
        'A',
        'Api'
    ];

    function WctTemplateService(/* Upload, */A, Api) {

        function page() {
            return A.Ajax.get(Api.wct.template.page);
        }

        function save(template) {
            return Upload.upload({
                url : Api.wct.template.save,
                data: template
            });
        }

        return {
            page: page,
            save: save
        };
    }
})();